package com.ice.body.business.service.impl;
import com.ice.base.model.SysLoginModel;
import com.ice.base.util.BaseUtil;
import com.ice.body.business.dao.WareHouseDao;
import com.ice.body.business.model.RecordLab;
import com.ice.body.business.model.ReagentStock;
import com.ice.body.business.model.WareHouseModel;
import com.ice.body.business.service.RecordLabService;
import com.ice.body.business.service.ReagentStockService;
import com.ice.body.business.service.WareHouseService;
import com.ice.base.dao.BaseDao;
import com.ice.base.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Date;

/**
 * Created with GuoYanBin.
 * Description:业务接口-仓库 serviceImpl
 * Date: 2021-06-22
 * Time: 03:05
 */
@Service
public class WareHouseServiceImpl extends BaseServiceImpl<WareHouseModel> implements WareHouseService{
    @Resource 
    private WareHouseDao dao;
    @Resource
    private ReagentStockService reagentStockService;
    @Resource
    private RecordLabService reagentRecordService;

    @Override
    public BaseDao<WareHouseModel> getBaseDao() {
        return dao;
    }

 /*   @Transactional
    @Override
    public void enterWarehouse(ReagentStock model) {
    //更新EPC状态为 0  存入仓库表
        ReagentStock reagentEpc = reagentStockService.getByEpcCode(model.getEpcCode());//根据epc编号查询试剂信息
        SysLoginModel user = BaseUtil.getCurrLoginModel();
        if(reagentEpc != null && null != user){
            // 加记录
            RecordLab rrModel = BaseUtil.getRecordModel(1);
            rrModel.setEpcCode(model.getEpcCode());
         //   rrModel.setUserId(user.getId());
            rrModel.setUserName(user.getUserName());
            rrModel.setCName(reagentEpc.getCName());
            reagentRecordService.insert(rrModel);
        }
    }
*/
}
